/*  1:   */ package org.intellij.lang.regexp;
/*  2:   */ 
/*  3:   */

import com.intellij.lang.ASTNode;
import com.intellij.lang.documentation.AbstractDocumentationProvider;
import com.intellij.psi.PsiElement;
import org.intellij.lang.regexp.psi.RegExpElement;
import org.intellij.lang.regexp.psi.RegExpGroup;
import org.intellij.lang.regexp.psi.RegExpProperty;
import org.jetbrains.annotations.Nullable;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public final class RegExpDocumentationProvider
/* 12:   */   extends AbstractDocumentationProvider
/* 13:   */ {
/* 14:   */   @Nullable
/* 15:   */   public String generateDoc(PsiElement paramPsiElement1, @Nullable PsiElement paramPsiElement2)
/* 16:   */   {
/* 17:33 */     if ((paramPsiElement1 instanceof RegExpProperty))
/* 18:   */     {
/* 19:34 */       RegExpProperty localRegExpProperty = (RegExpProperty)paramPsiElement1;
/* 20:35 */       ASTNode localASTNode = localRegExpProperty.getCategoryNode();
/* 21:36 */       if (localASTNode != null)
/* 22:   */       {
/* 23:37 */         String str = RegExpLanguageHosts.getInstance().getPropertyDescription(localASTNode.getPsi(), localASTNode.getText());
/* 24:38 */         if (str != null)
/* 25:   */         {
/* 26:39 */           if (localRegExpProperty.isNegated()) {
/* 27:40 */             return "Property block stands for characters not matching " + str;
/* 28:   */           }
/* 29:42 */           return "Property block stands for " + str;
/* 30:   */         }
/* 31:   */       }
/* 32:   */     }
/* 33:47 */     return null;
/* 34:   */   }
/* 35:   */   
/* 36:   */   @Nullable
/* 37:   */   public String getQuickNavigateInfo(PsiElement paramPsiElement1, PsiElement paramPsiElement2)
/* 38:   */   {
/* 39:52 */     if ((paramPsiElement1 instanceof RegExpGroup)) {
/* 40:53 */       return "Capturing Group: " + ((RegExpElement)paramPsiElement1).getUnescapedText();
/* 41:   */     }
/* 42:55 */     return null;
/* 43:   */   }
/* 44:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.RegExpDocumentationProvider

 * JD-Core Version:    0.7.0.1

 */